/**
 * @author：anlzou
 * @Date：Created in22:22 2021/4/13
 * @Github：https://github.com/anlzou
 * @Description：
 */
package com.anlzou.excep;

import org.junit.jupiter.api.Test;

public class Excep01 {
    @Test
    public void excep(){
        try{
            int a[] = new int[2];
            System.out.println("Access element three :" + a[2]);
        }catch(ArrayIndexOutOfBoundsException e){
            System.out.println("Exception thrown  :" + e);
            System.out.println("Out of the block");
        }
    }


}
